﻿<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:vm="clr-namespace:Cars.ViewModels"
             BindingContext="{DynamicResource VM}"
             x:Class="Cars.Views.AuthorizationPage">
    <ContentPage.Resources>
        <vm:AuthorizationViewModel x:Key="VM"/>
    </ContentPage.Resources>
    <Grid>
        <StackLayout HorizontalOptions="Center" VerticalOptions="Center" Orientation="Vertical" WidthRequest="200">
            <Label Text="{Binding Message}" TextColor="Red"/>
            
            <Label Text="Login"/>
            <Entry Text="{Binding Login}"/>
            <Label Text="Password"/>
            <Entry Text="{Binding Password}"/>

            <Button Text="Sign in" CornerRadius="10" Margin="10" Command="{Binding Authorization}"/>
        </StackLayout>
        <Button Command="{Binding Registration}" Text="Registration" VerticalOptions="EndAndExpand" HorizontalOptions="Center" CornerRadius="10" Margin="40"/>
    </Grid>
</ContentPage>